﻿
<script>
    var tempmodel = avalon.define({
        $id: "YGGL",
        name: "员工管理",

        modelData: { "UserName": "","XinBie":"男", "CCRQ": "", "JTZZ": "", "JRGSSJ": "", "GJJJS": "", "GJJSJ": "", "XL": "", "LXFS": "", "SFZHM": "", "SBSJ": "", "SBJS": "", "GZ": "", "YHXX": "", "Remark": "", "FileS": "" },
        iswf: false,//是否属于流程表单
        inittemp: function (strId) {
            //获取请假类型
            $.getJSON('/API/FTAPI.ashx?Action=GETCOLUMNLIST', { P1: 11 }, function (resultData) {
                if (resultData.ErrorMsg == "") {
                    tempmodel.YGGLTypeData = resultData.Result;
                }
            })
            if (strId) {
                //编辑加载数据
                $.getJSON('/API/FTAPI.ashx?Action=GETYGGLMODEL', { P1: strId }, function (resultData) {
                    if (resultData.ErrorMsg == "") {
                        tempmodel.modelData = resultData.Result;
                        if (tempmodel.modelData.CCRQ && tempmodel.modelData.CCRQ.length > 10) {
                            tempmodel.modelData.CCRQ = tempmodel.modelData.CCRQ.substring(0, 10);
                        }

                        setTimeout(" ComFunJS.initForm()", 500)
                    }
                })
            } else {
                ComFunJS.initForm()
            }
        },//初始化
        SaveData: function (btdom, piid) {
            var data = tempmodel.modelData.$model;
            var modelValue = JSON.stringify(data);
            $.post("/API/FTAPI.ashx?ACTION=ADDYGGL", { P1: modelValue }, function (result) {
                var jsonresult = $.parseJSON(result)
                btdom.removeClass("disabled").find("i").hide();
                if ($.trim(jsonresult.ErrorMsg) == "") {
                    ComFunJS.winsuccessnew("操作成功");
                }
            });
        },
    });
   
</script>
<div class="form-horizontal" ms-controller="YGGL">
    <div class="form-group">
        <label class="col-xs-2 control-label">员工姓名</label>
        <div class="col-xs-8">
            <input type="text" class="form-control szhl_getPeoples szhl_require" signle="Y" ms-duplex="modelData.UserName" />
        </div>
    </div> 
    <div class="form-group">
        <label class="col-xs-2 control-label">性别</label>
        <div class="col-xs-3">
            <select ms-duplex="modelData.XinBie" class="form-control">
                <option ms-attr-selected="modelData.XinBie=='男'">男</option>
                <option ms-attr-selected="modelData.XinBie=='女'">女</option>
            </select> 
        </div>
        <label class="col-xs-2 control-label"> <span class="Required">*</span>  出生日期 </label>
        <div class="col-xs-3">
            <input type="text" value="" ms-duplex="modelData.CCRQ" class="form-control szhl_form_date szhl_require" /> 
        </div>  
    </div>
    <div class="form-group">
        <label class="col-xs-2 control-label"> <span class="Required">*</span>  入职时间 </label>
        <div class="col-xs-3">
            <input type="text" value="" ms-duplex="modelData.JRGSSJ" class="form-control szhl_form_date szhl_require" />

        </div>
        <label class="col-xs-2 control-label">家庭住址</label>
        <div class="col-xs-3">
            <input type="text" value="" ms-duplex="modelData.JTZZ" class="form-control szhl_require" />
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-2 control-label">  公积金时间 </label>
        <div class="col-xs-3">
            <input type="text" value="" ms-duplex="modelData.GJJSJ" class="form-control szhl_form_date" />

        </div>
        <label class="col-xs-2 control-label">公积金基数</label>
        <div class="col-xs-3">
            <input type="text" value="" ms-duplex="modelData.GJJJS" class="form-control " />
        </div>

    </div>
    <div class="form-group">
        <label class="col-xs-2 control-label"> 学历 </label>
        <div class="col-xs-3">
            <input type="text" value="" ms-duplex="modelData.XL" class="form-control" />

        </div>
        <label class="col-xs-2 control-label">联系方式</label>
        <div class="col-xs-3">
            <input type="text" value="" ms-duplex="modelData.LXFS" class="form-control szhl_require" />
        </div>

    </div>
    <div class="form-group">
        <label class="col-xs-2 control-label">  身份证号码 </label>
        <div class="col-xs-3">
            <input type="text" value="" ms-duplex="modelData.SFZHM" class="form-control" />

        </div>
        <label class="col-xs-2 control-label">社保时间</label>
        <div class="col-xs-3">
            <input type="text" value="" ms-duplex="modelData.SBSJ" class="form-control szhl_form_date" />
        </div>

    </div>
    <div class="form-group">
        <label class="col-xs-2 control-label">  社保基数 </label>
        <div class="col-xs-3">
            <input type="text" value="" ms-duplex="modelData.SBJS" class="form-control " />

        </div>
        <label class="col-xs-2 control-label">工资</label>
        <div class="col-xs-3">
            <input type="text" value="" ms-duplex="modelData.GZ" class="form-control " />
        </div>

    </div>
    <div class="form-group">
        <label class="col-xs-2 control-label">  银行信息 </label>
        <div class="col-xs-3">
            <input type="text" value="" ms-duplex="modelData.YHXX" class="form-control" />

        </div>


    </div>
    <div class="form-group">
        <label class="col-xs-2 control-label">备注</label>
        <div class="col-xs-8">
            <textarea id="conRemark" ms-duplex="modelData.Remark" class="szhl_UEEDIT form-control "></textarea>
        </div>
    </div> 
    <div class="form-group">
        <label class="col-xs-2 control-label">附件</label>
        <div class="col-xs-8">
            <input type="text" value="" class="span2  szhl_Upload form-control" ms-duplex="modelData.FileS" />
        </div>
    </div>
</div>
